#!/bin/bash

echo "🔧 设置 Git Hooks..."
echo ""

# 设置 Git hooks 路径
if git config core.hooksPath .husky; then
    echo "✅ 成功设置 Git hooks 路径为 .husky"
else
    echo "❌ 设置失败，请确保已安装 Git"
    exit 1
fi

echo ""
echo "验证配置..."
git config core.hooksPath

echo ""
echo "✅ 设置完成！"
echo ""
echo "测试 hooks:"
echo "1. 修改一个文件"
echo "2. git add ."
echo "3. git commit -m \"feat: 测试提交\""
echo ""

